package com.qf.vo;

import com.qf.exception.AirException;

public class ResultVoUtil {
    private Object data;

    public ResultVoUtil(Object data) {
        this.data = data;
    }

    public static ResultVo success(Object data){
        ResultVo resultVo=new ResultVo(0,"成功" , data);
        return resultVo;
    }

    public static ResultVo success(){
        return success(null);
    }

    public static ResultVo error(AirException ex){
        ResultVo resultVo=new ResultVo(ex.getCode(),ex.getMsg(),null);

        return resultVo;
    }


}
